<%@page import="com.blockchain.front.service.content.entity.Advertisement"%>
<%@page import="com.blockchain.front.service.content.ContentManage"%>
<%@page import="com.blockchain.common.enums.Sblx"%>
<%{
	ContentManage advertisementManage = serviceSession.getService(ContentManage.class);
	Advertisement[] advertisements = advertisementManage.getAll(Sblx.PC);
	if (advertisements != null && advertisements.length > 0) {

%>

 	<div id="myCarousel" class="my-carousel" style="position:relative;">
       	<ol class="my-carousel-indicators">
           <%int i=1;for(Advertisement advertisement : advertisements){%>
           	<li data-target="#myCarousel" data-slide-to="<%=i%>" <%if(i==1){%>class="active"<%}%>></li>
           <%i++;}%>
       	</ol>
        <div class="my-carousel-inner">
             <%for (int ii =0;ii<advertisements.length;ii++){Advertisement advertisement=advertisements[ii];%>
            <div class="item hand <%if(ii==0){%>active<%}%>" onclick="window.open('<%if(!StringHelper.isEmpty(advertisement.url)){ %><%StringHelper.filterHTML(out, advertisement.url);%><%}else{ %>javascript:void(0)<%}%>')" style="background-image: url(<%=fileStore.getURL(advertisement.imageCode)%>);"> 
               <%if(ii==0){%>
                <div class="listcent">
                </div>
                <%}%>
            </div>
           <%}%> 
        </div>
        <div class="d-box d-next"><span class="next"></span></div>
        <div class="d-box d-prev"><span class="prev"></span></div>
    </div>
<%}}%>
